<%@ include file="base.jsp" %>
<%@ page isELIgnored ="true" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
<head>
<title>Insert title here</title>
<script type="text/javascript">
	$(document).ready(function() {
		$('#ff').form({
			url:'',
			onSubmit:function(){
		        // do some check  
		        // return false to prevent submit;  
				return false;
			},
			success:function(data){
				alert(data);
			}
		});
		$.extend($.fn.validatebox.defaults.rules,{
			equals:{
				validator:function(value,param){
					return value == $(param[0]).val();
				},
				message:'Field do not match.'
			}
		});
	});
 
</script>
</head>
<body>
	<form id="ff" method="post">
		<input id="username" name="username" class="easyui-validatebox" required="required"/>
		<input id="pwd" name="pwd" type="password" class="easyui-validatebox" data-options="required:true"/>
		<input id="rpwd" name="rpwd" type="password" class="easyui-validatebox" required="required" validType="equals['#pwd']"/>
		<input type="submit" value="Register"/>
	</form>

</body>
</html>